namespace SMS.Gateway.Libs
{
    public class WBXML
    {
        // Fields
        public const byte CHARSET_UTF_8 = 0x6a;
        public const byte NULL = 0;
        public const byte TAGTOKEN_END = 1;
        public const byte TOKEN_INLINE_STRING_FOLLOWS = 3;
        public const byte TOKEN_OPAQUEDATA_FOLLOWS = 0xc3;
        public const byte VERSION_1_1 = 1;
        public const byte VERSION_1_2 = 2;

        // Methods
        public static byte SetTagTokenIndications(byte token, bool hasAttributes, bool hasContent)
        {
            if (hasAttributes)
                token = (byte)(token | 0xc0);
            
            if (hasContent)
                token = (byte)(token | 0x40);
            
            return token;
        }
    }
}

